import axios from "@/common/axios";
import { API_URL } from "@/common/constants";

export const queryCompLifeDetailList = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/queryCompLifeDetailList", json);
  return data;
};

export const auditCompLifeDetail = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/auditCompLifeDetail", json);
  return data;
};

export const submitCompLifeDetail = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/submitCompLifeDetail", json);
  return data;
};


export const updateCompLife = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/updateCompLife", json);
  return data;
};


export const addCompLife = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/addCompLife", json);
  return data;
};



export const delCompLife = async (json) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/delCompLife", json);
  return data;
};


export const uploadFile = async (formData) => {
  let { data } = await axios.post(API_URL + "rCompLifeDetailApi/uploadFile", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;

}